A database is a collection of stored data that is logically related and that is accessible by one or more users. A popular type of database is the relational database management system, which includes relational tables made up of rows and columns. Each row represents an occurrence of an entity defined by the table, with an entity being a person, place, or thing about which the table contains information. Various types of operations can be performed in the database system.
In one arrangement, to extract data from a relational table, Structured Query Language (SQL) statements can be issued to the database system. In response to SQL statements, data is extracted from one or more tables in the database system. SQL statements include data definition language (DDL) statements that are used to define database structures and data manipulation language (DML) statements that manipulate rows and data values. Examples of DML statements include INSERT, SELECT, UPDATE, and DELETE.
During a database operation, the system may crash, causing the operation to fail. The crash may be a software module crash, or the crash may be an overall system crash. Typically, incomplete user updates are “rolled back” before the system is available for use again. Rollback refers to the process of recovering the prior state of a portion of a table before the start of the incomplete update request or transaction. Because of the potentially large amounts of updates that may have been performed at the time of the system crash, the amount of time needed to roll back user updates may be relatively long, making the system unavailable for a substantial amount of time after restart. For many users, this relatively long delay may be unacceptable.
To enable faster access to the system, a deferred recovery mechanism is employed in some database systems. When the database system is restarted after a crash, the database system is available for general use, but access is not permitted to tables (or rows of tables) for incomplete user updates that need to be rolled back. Although the user has quicker availability to a database system after restart using the latter technique, a portion of the data still remains unavailable until after rollback has been completed.
Another issue in some database systems is that, as a row in a table is being changed, the “before image” of the row is copied to a journal, which is another table in the database system. The before image of the row represents the row before the update or change operation started. Thus, if a system was to crash, the before image of the row in the journal can be used to recover or roll back a transaction to a state prior to the crash. The process of copying a row to the journal takes up system bandwidth, and adds to delays in operations performed in the database system.